<h1>ButtonColorTransform</h1>

<p>ButtonColorTransform defines the colour transform that is applied to each shape 
that is used to draw a button. In practice this class is only used in conjunction 
with DefineButton. DefineButton2, which supercedes DefineButton allows colour transforms 
to be specified in the ButtonRecord that identifies each shape that is displayed 
for a given button state so ButtonColorTransforms are normally only used with 
DefineButton instructions.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">10</td>
<td>Identifies the ButtonColorTransform instruction when it is encoded. It is encoded 
along with the length field as a 16-bit integer (Little-endian byte order).</td>
</tr>

<tr>
<td nowrap valign="top">length</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>The length in bytes of the body of the instruction when it is encoded. If the 
length is greater than 62 then this field is set to 0x3F and the length is encoded 
using the extendedLength field. Encoded with the type field as a 16-bit integer.</td>
</tr>

<tr>
<td nowrap valign="top">extendedLength</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>Optional. Contains the length in bytes of the encoded instruction if it is
greater than 62 bytes. If the length is 62 bytes or less then this field is 
omitted. This field is only included for completeness as the same mechanism for
handling large instructions also applies to ButtonColorTransforms however in 
practice the instruction is rarely encoded into more than a few bytes.</td>
</tr>

<tr>
<td nowrap valign="top">identifier</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The identifier for the button definition - DefineButton (typically) or 
DefineButton2 (rarely) that defines the appearance and behaviour of a button.</td>
</tr>

<tr>
<td nowrap valign="top">colorTransform</td>
<td nowrap valign="top">ColorTransform</td>
<td></td>
<td>Describes how the colours of the shape(s) used to draw the button are changed
when the button is displayed.</td>
</tr>

</table>

<h2>History</h2>

<p>ButtonColorTransform is defined as the DefineButtonCXForm structure in the 
Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 2.</p>
